package com.cody.dao;

import com.cody.entity.Question;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * @author Cody
 * @date 2021/4/8 - 12:05
 */
public interface QuestionDao {
    List<Question> queryAllQuestion();
    List<Question> queryAllQuestionByAdmin();
    List<HashMap<String,Object>>   queryQuestion();

    List<Question> queryQuestionByStudentId(@Param("studentNumber") String studentNumber);

    List<Question> queryQuestionsByTeacherId(@Param("TeacherNumber") String TeacherNumber);

    List<Question> queryQuestionByQuestionText(@Param("QuestionText") String questionText);
    List<Question> queryQuestionByKeyword(@Param("Keyword") String keyword);

    List<Question> queryQuestionByQuestionsubjectAndQuestionsection(@Param("questionSubject") String questionSubject, @Param("questionSection") String questionSection);

    List<Question> queryQuestionByCommentSum();

    List<String> queryQuestionByQuestionSection();

    List<String> queryQuestionByQuestionSubject();


    Question queryQuestionByQuestionId(@Param("QuestionId") Integer questionId);


    boolean insertQuestion(@Param("question") Question question);

    boolean updateQuestion(@Param("questionId") Integer questionId);
    boolean updQuestionInfo(@Param("question") Question question);

    boolean delQuestionByQuestionId(@Param("questionId") Integer questionId);
}
